package ip.dto;

import java.io.Serializable;

/***********************************************************************
 * Module:  OrderItem.java
 * Author:  mojsilo
 * Purpose: Defines the Class OrderItem
 ***********************************************************************/

public class OrderItemDTO implements Serializable
{
	private static final long serialVersionUID = -8764200269288034562L;
	private long orderitemId;
	private int quantity;

	private MovieDTO movie;
	private OrderDTO oparentOder;
	/**
	 * @return the movie
	 */
	public MovieDTO getMovie() {
		return movie;
	}
	/**
	 * @param movie the movie to set
	 */
	public void setMovie(MovieDTO movie) {
		this.movie = movie;
	}
	/**
	 * @return the oparentOder
	 */
	public OrderDTO getOparentOder() {
		return oparentOder;
	}
	/**
	 * @param oparentOder the oparentOder to set
	 */
	public void setOparentOder(OrderDTO oparentOder) {
		this.oparentOder = oparentOder;
	}
	/**
	 * @return the orderitemId
	 */
	public long getOrderitemId() {
		return orderitemId;
	}
	/**
	 * @param orderitemId the orderitemId to set
	 */
	public void setOrderitemId(long orderitemId) {
		this.orderitemId = orderitemId;
	}
	/**
	 * @return the quantity
	 */
	public int getQuantity() {
		return quantity;
	}
	/**
	 * @param quantity the quantity to set
	 */
	public void setQuantity(int quantity) {
		this.quantity = quantity;
	}
	/**
	 * Constructs a <code>String</code> with all attributes
	 * in name = value format.
	 *
	 * @return a <code>String</code> representation 
	 * of this object.
	 */
	public String toString()
	{
		final String TAB = "    ";

		String retValue = "";

		retValue = "OrderItemDTO ( "
			+ super.toString() + TAB
			+ "orderitemId = " + this.orderitemId + TAB
			+ "quantity = " + this.quantity + TAB
			+ "movie = " + this.movie + TAB
			+ "oparentOder = " + this.oparentOder + TAB
			+ " )";

		return retValue;
	}

}